package TestDemo;

//自定义类singleton
class Singleton {
    //创建一个对象
    private static Singleton instance = new Singleton();
    //提供一个获取instance的方法
    private static Singleton getInstance(){
        return instance;
    }
}

public class Demo {
    public static void main(String[] args) {

    }
}
